import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";


// 查询用户列表
export function listTbUser(query) {
  return request({
    url: '/game/list',
    method: 'get',
    params: query
  })
}

// 删除用户
export function delTbUser(userId) {
  return request({
    url: '/game/delete/' + userId,
    method: 'delete'
  })
}
// 修改用户列表
export function editTbUser(data) {
  return request({
    url: '/game/edit',
    method: 'put',
    data: data
  })
}

export function getUsers(userId) {
  return request({
    url: '/game/selectById/' + parseStrEmpty(userId),
    method: 'get'
  })
}
// 查询用户列表
export function listUser(query) {
  return request({
    url: '/system/user/list',
    method: 'get',
    params: query
  })
}

// 查询用户详细
export function getUser(userId) {
  return request({
    url: '/system/user/' + parseStrEmpty(userId),
    method: 'get'
  })
}

// 新增用户
export function addUser(data) {
  return request({
    url: '/system/user',
    method: 'post',
    data: data
  })
}
